#代码格式化的快捷键：Ctrl+Alt+L
#若循环次数不确定，一般用while，否则用for
import random
computer = random.randint(0, 10)
while True:
    ago = eval(input('请输入你猜的数字:'))
    if ago > computer:
        print('猜的数字大了')
    elif ago < computer:
        print('猜的数字小了')
    else:
        print('恭喜，猜对了')
        break;
